package com.lagou.ipersistence.transaction;

import com.lagou.ipersistence.session.TransactionIsolationLevel;

import javax.sql.DataSource;
import java.sql.Connection;
import java.util.Properties;

/**
 * @author Yan Jiahong
 * Created on 2020/11/22
 */
public interface TransactionFactory {
    
    void setProperties(Properties props);
    
    Transaction newTransaction(Connection connection);
    
    Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit);
}
